package com.hujf.flink.selfFunction;

import org.apache.flink.api.common.functions.FlatMapFunction;
import org.apache.flink.api.common.functions.RichFlatMapFunction;
import org.apache.flink.api.java.tuple.Tuple2;
import org.apache.flink.api.java.typeutils.TupleTypeInfo;
import org.apache.flink.streaming.api.datastream.DataStream;
import org.apache.flink.streaming.api.datastream.DataStreamSource;
import org.apache.flink.streaming.api.datastream.SingleOutputStreamOperator;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
import org.apache.flink.util.Collector;

/**
 * @Author hujf
 * @Date 2022/5/23 9:23
 * @Description TODO
 */
public class MapFunc {
    public static void main(String[] args) {
        StreamExecutionEnvironment environment = StreamExecutionEnvironment.getExecutionEnvironment();
        DataStream<Tuple2<String,Integer>> source = environment.fromElements(
                new Tuple2<>("A",1),
                new Tuple2<>("B",2),
                new Tuple2<>("C",1),new Tuple2<>("C",1),
                new Tuple2<>("B",1),
                new Tuple2<>("A",1)
        );

        DataStream<Tuple2<String,Integer>> source2 = environment.fromElements(
                new Tuple2<>("A",1),
                new Tuple2<>("B",2),
                new Tuple2<>("C",1),new Tuple2<>("C",1),
                new Tuple2<>("B",1),
                new Tuple2<>("A",1)
        );



    }
}
